import {_decorator, Component} from 'cc';
import {StorageManager} from "db://assets/StorageManager";
import {StorageKey} from "db://assets/StorageKey";

const {ccclass, property} = _decorator;

@ccclass('MainController')
export class MainController extends Component {
    start() {

    }

    update(deltaTime: number) {

    }

    public setData() {
        StorageManager.getInstance().setData(StorageKey.MUSIC, String(true));
        StorageManager.getInstance().setData(StorageKey.SOUND, String(true));
    }

    public getData() {
        console.log(StorageManager.getInstance().getData(StorageKey.MUSIC));
        console.log(StorageManager.getInstance().getData(StorageKey.SOUND));
    }
}